/**
 * 主页js
 */
if (window.location.href == 'http://dfz.jl.gov.cn/' || window.location.href == 'http://dfz.jl.gov.cn/index.htm') {
//首页


	// 总计时器，保证目标加载完毕再执行js（轮播+国内动态+国务院[iframe]）
	_EsdDynamicTransformationScript.intervalMpa = setInterval(function(){
		
		if( ( $("#slideBox .hd ul li:eq(4)") != undefined ) 
				&& ( $(".slideTxtBox1 .bd > ul:eq(2) a:last") != undefined ) 
				&& ( document.getElementsByTagName("iframe")[1].contentWindow.document.getElementsByTagName("a")[0] != undefined ) 
				&& ( $(".slideTxtBox3 .bd > ul:eq(2) a:last") != undefined ) ){
			clearInterval(_EsdDynamicTransformationScript.intervalMpa);
			
			part_First();
			part_Second();
			part_Third();
			part_Forth();
			
		}
		
	}, 500);
	
	
	
	var part_Second = function(){
		
		//各个选项名称
	_EsdDynamicTransformationScript.esd1TagNum1 = $(".slideTxtBox1 .hd ul a:eq(0)");
	_EsdDynamicTransformationScript.esd1TagNum2 = $(".slideTxtBox1 .hd ul a:eq(1)");
	_EsdDynamicTransformationScript.esd1TagNum3 = $(".slideTxtBox1 .hd ul a:eq(2)");
		
		//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esd1TagNum1Content1 = $(".slideTxtBox1 .bd > ul:eq(0) a:first");
	_EsdDynamicTransformationScript.esd1TagNum2Content1 = $(".slideTxtBox1 .bd > ul:eq(1) a:first");
	_EsdDynamicTransformationScript.esd1TagNum3Content1 = $(".slideTxtBox1 .bd > ul:eq(2) a:first");
		
		//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esd1TagNum1ContentN = $(".slideTxtBox1 .bd > ul:eq(0) a:last");
	_EsdDynamicTransformationScript.esd1TagNum2ContentN = $(".slideTxtBox1 .bd > ul:eq(1) a:last");
	_EsdDynamicTransformationScript.esd1TagNum3ContentN = $(".slideTxtBox1 .bd > ul:eq(2) a:last");
		
		
	//第一块
	_EsdDynamicTransformationScript.esd1TagNum1.focus(function (e) {
		$(this).bind("keydown.keydown_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum1Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum1.blur(function () {
		$(this).unbind("keydown.keydown_1");
	});

	_EsdDynamicTransformationScript.esd1TagNum1Content1.focus(function () {
		$(this).bind("keydown.keydown_s1", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum1.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum1Content1.blur(function () {
		$(this).unbind("keydown.keydown_s1");
	});

	_EsdDynamicTransformationScript.esd1TagNum1ContentN.focus(function () {
		$(this).bind("keydown.keydown_e1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd1TagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum1ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e1");
	});
	
	//第二块
	_EsdDynamicTransformationScript.esd1TagNum2.focus(function (e) {
		$(this).bind("keydown.keydown_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd1TagNum1.mouseover();
				_EsdDynamicTransformationScript.esd1TagNum1ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum2Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum2.blur(function () {
		$(this).unbind("keydown.keydown_2");
	});

	_EsdDynamicTransformationScript.esd1TagNum2Content1.focus(function () {
		$(this).bind("keydown.keydown_s2", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum2.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum2Content1.blur(function () {
		$(this).unbind("keydown.keydown_s2");
	});

	_EsdDynamicTransformationScript.esd1TagNum2ContentN.focus(function () {
		$(this).bind("keydown.keydown_e2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum3.mouseover();
				_EsdDynamicTransformationScript.esd1TagNum3.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum2ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e2");
	});
	
	//第三块
	_EsdDynamicTransformationScript.esd1TagNum3.focus(function (e) {
		$(this).bind("keydown.keydown_3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd1TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd1TagNum2ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum3Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum3.blur(function () {
		$(this).unbind("keydown.keydown_3");
	});
	
	_EsdDynamicTransformationScript.esd1TagNum3Content1.focus(function () {
		$(this).bind("keydown.keydown_s3", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd1TagNum3.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd1TagNum3Content1.blur(function () {
		$(this).unbind("keydown.keydown_s3");
	});
	
	
	}
	
	
	
	
	var part_Third = function(){
	
		// 将iframe所包含的a链接数 第一个a元素 最后一个a元素赋值给第一个参数的js对象
		_EsdDynamicTransformationScript.getIframeInfos = function(jsObj,iframeObj){
			if(iframeObj != undefined){
				jsObj.aLink_num = iframeObj.contentWindow.document.getElementsByTagName("a").length;
				jsObj.first_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[0];
				jsObj.last_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[jsObj.aLink_num-1];
				jsObj.self = iframeObj;
			}
		};
	
		// 声明iframe操作对象
		_EsdDynamicTransformationScript.iframe1 = {};
		_EsdDynamicTransformationScript.iframe2 = {};
	
		//通过方法赋值   
		_EsdDynamicTransformationScript.iframeElement1 = document.getElementsByTagName("iframe")[0];   // 需要修改 这里的iframe获取
		_EsdDynamicTransformationScript.iframeElement2 = document.getElementsByTagName("iframe")[1];   // 需要修改 这里的iframe获取
	
		//选项卡标签 jquery对象
		_EsdDynamicTransformationScript.iframeTab1 = $(".slideTxtBox2 .hd ul li:eq(0) a");  // 需要修改 这里的tab获取
		_EsdDynamicTransformationScript.iframeTab2 = $(".slideTxtBox2 .hd ul li:eq(1) a");  // 需要修改 这里的tab获取
			
		//通过方法赋值   
		_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe1,_EsdDynamicTransformationScript.iframeElement1);  
		_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe2,_EsdDynamicTransformationScript.iframeElement2); 

		//第一个标签 切换
		_EsdDynamicTransformationScript.iframeTab1.focus(function (e) {
			e = $(this).mouseover();
			$(this).bind("keydown.iframeKeydown_1", function (e) {
				if (e.shiftKey && e.keyCode == 9) {
					
				} else if (e.keyCode == 9) {
					$(_EsdDynamicTransformationScript.iframe1.self).focus();
					return false;
				}
			});
		});
		_EsdDynamicTransformationScript.iframeTab1.blur(function () {
			$(this).unbind("keydown.iframeKeydown_1");
		});

		// 第一个标签的第一个链接
		$(_EsdDynamicTransformationScript.iframe1.first_aLink).focus(function () {
			$(this).bind("keydown.iframeKeydown_first1", function (e) {
				if (e.shiftKey && e.keyCode == 9) {
					_EsdDynamicTransformationScript.iframeTab1.focus();
					return false;
				} else if (e.keyCode == 9) {

				}
			});
		});
		$(_EsdDynamicTransformationScript.iframe1.first_aLink).blur(function () {
			$(this).unbind("keydown.iframeKeydown_first1");
		});

		// 第一个标签的最后一个链接
		$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus(function () {
			$(this).bind("keydown.iframeKeydown_first1", function (e) {
				if (e.shiftKey && e.keyCode == 9) {

				} else if (e.keyCode == 9) {
					_EsdDynamicTransformationScript.iframeTab2.mouseover();
					_EsdDynamicTransformationScript.iframeTab2.focus();
					return false;
				}
			});
		});
		$(_EsdDynamicTransformationScript.iframe1.last_aLink).blur(function () {
			$(this).unbind("keydown.iframeKeydown_first1");
		});


		//第二个标签切换
		_EsdDynamicTransformationScript.iframeTab2.focus(function (e) {
			$(this).bind("keydown.iframeKeydown_2", function (e) {
				if (e.shiftKey && e.keyCode == 9) {
					_EsdDynamicTransformationScript.iframeTab1.mouseover();
					$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus();
					return false;
				} else if (e.keyCode == 9) {
					$(_EsdDynamicTransformationScript.iframe2.self).focus();
					return false;
				}
			});
		});
		_EsdDynamicTransformationScript.iframeTab2.blur(function () {
			$(this).unbind("keydown.iframeKeydown_2");
		});

		// 第二个标签的第一个链接
		$(_EsdDynamicTransformationScript.iframe2.first_aLink).focus(function () {
			$(this).bind("keydown.iframeKeydown_first2", function (e) {
				if (e.shiftKey && e.keyCode == 9) {
					_EsdDynamicTransformationScript.iframeTab2.focus();
					return false;
				} else if (e.keyCode == 9) {

				}
			});
		});
		$(_EsdDynamicTransformationScript.iframe2.first_aLink).blur(function () {
			$(this).unbind("keydown.iframeKeydown_first2");
		});


		// 第二个标签的最后一个链接
		$(_EsdDynamicTransformationScript.iframe2.last_aLink).focus(function () {
			$(this).bind("keydown.iframeKeydown_last2", function (e) {
				if (e.shiftKey && e.keyCode == 9) {

				} else if (e.keyCode == 9) {

				}
			});
		});
		$(_EsdDynamicTransformationScript.iframe2.last_aLink).blur(function () {
			$(this).unbind("keydown.iframeKeydown_last2");
		});


	}	
		
		
	
	var part_Forth = function(){
		
		//各个选项名称
	_EsdDynamicTransformationScript.esd2TagNum1 = $(".slideTxtBox3 .hd ul a:eq(0)");
	_EsdDynamicTransformationScript.esd2TagNum2 = $(".slideTxtBox3 .hd ul a:eq(1)");
	_EsdDynamicTransformationScript.esd2TagNum3 = $(".slideTxtBox3 .hd ul a:eq(2)");
	_EsdDynamicTransformationScript.esd2TagNum4 = $(".slideTxtBox3 .hd ul a:eq(3)");
	
		//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esd2TagNum1Content1 = $(".slideTxtBox3 .bd > ul:eq(0) a:first");
	_EsdDynamicTransformationScript.esd2TagNum2Content1 = $(".slideTxtBox3 .bd > ul:eq(1) a:first");
	_EsdDynamicTransformationScript.esd2TagNum3Content1 = $(".slideTxtBox3 .bd > ul:eq(2) a:first");
	_EsdDynamicTransformationScript.esd2TagNum4Content1 = $(".slideTxtBox3 .bd > ul:eq(3) a:first");
	
		//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esd2TagNum1ContentN = $(".slideTxtBox3 .bd > ul:eq(0) a:last");
	_EsdDynamicTransformationScript.esd2TagNum2ContentN = $(".slideTxtBox3 .bd > ul:eq(1) a:last");
	_EsdDynamicTransformationScript.esd2TagNum3ContentN = $(".slideTxtBox3 .bd > ul:eq(2) a:last");
	_EsdDynamicTransformationScript.esd2TagNum4ContentN = $(".slideTxtBox3 .bd > ul:eq(3) a:last");
		
	//第一块
	_EsdDynamicTransformationScript.esd2TagNum1.focus(function (e) {
		$(this).bind("keydown.keydown_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum1Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum1.blur(function () {
		$(this).unbind("keydown.keydown_1");
	});

	_EsdDynamicTransformationScript.esd2TagNum1Content1.focus(function () {
		$(this).bind("keydown.keydown_s1", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum1.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum1Content1.blur(function () {
		$(this).unbind("keydown.keydown_s1");
	});

	_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus(function () {
		$(this).bind("keydown.keydown_e1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum1ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e1");
	});
	
	//第二块
	_EsdDynamicTransformationScript.esd2TagNum2.focus(function (e) {
		$(this).bind("keydown.keydown_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd2TagNum1.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum2Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum2.blur(function () {
		$(this).unbind("keydown.keydown_2");
	});

	_EsdDynamicTransformationScript.esd2TagNum2Content1.focus(function () {
		$(this).bind("keydown.keydown_s2", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum2.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum2Content1.blur(function () {
		$(this).unbind("keydown.keydown_s2");
	});

	_EsdDynamicTransformationScript.esd2TagNum2ContentN.focus(function () {
		$(this).bind("keydown.keydown_e2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum3.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum3.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum2ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e2");
	});
	
	//第三块
	_EsdDynamicTransformationScript.esd2TagNum3.focus(function (e) {
		$(this).bind("keydown.keydown_3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd2TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum2ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum3Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum3.blur(function () {
		$(this).unbind("keydown.keydown_3");
	});

	_EsdDynamicTransformationScript.esd2TagNum3Content1.focus(function () {
		$(this).bind("keydown.keydown_s3", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum3.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum3Content1.blur(function () {
		$(this).unbind("keydown.keydown_s3");
	});

	_EsdDynamicTransformationScript.esd2TagNum3ContentN.focus(function () {
		$(this).bind("keydown.keydown_e3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum4.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum4.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum3ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e3");
	});
	
	//第四块
	_EsdDynamicTransformationScript.esd2TagNum4.focus(function (e) {
		$(this).bind("keydown.keydown_4", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd2TagNum3.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum3ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum4Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum4.blur(function () {
		$(this).unbind("keydown.keydown_4");
	});
	
	_EsdDynamicTransformationScript.esd2TagNum4Content1.focus(function () {
		$(this).bind("keydown.keydown_s4", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum4.focus();
				return false;
			}else if (e.keyCode == 9) {

			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum4Content1.blur(function () {
		$(this).unbind("keydown.keydown_s4");
	});
	
	}
	
	
	
	
	
	
	
	
	
		
		
}